package com.kaifamiao.time;

import java.time.LocalDate;

public class LocalDateInstance {

    public static void main(String[] args) {

        // 获得今天对应的日期
        LocalDate date = LocalDate.now();
        System.out.println( date );

        // 获得指定年月日对应的日期
        LocalDate birthdate = LocalDate.of( 2002, 9, 27 );
        System.out.println( birthdate );

        // 获得指定年份中第几天对应的日期
        LocalDate localDate = LocalDate.ofYearDay( 2020, 200 );
        System.out.println( localDate );

        LocalDate theDate = LocalDate.ofEpochDay( 36500 );
        System.out.println( theDate );

        System.out.println( "- ".repeat( 10 ) );

        System.out.println( LocalDate.MIN );
        System.out.println( LocalDate.MAX );

        System.out.println( LocalDate.EPOCH );

    }

}
